# coding=UTF-8
# coding=UTF-8
__author__ = 'Administrator'
from util import *
from template import *
import random

def method2(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #先领先，后落后
    # base_start=[lead_player_a+lead_event_a+'后，'+team_a+'最大领先了'+str(a_lead)+'分。'+'随后'+team_b+'打出一波反攻，'+lead_player_b+lead_event_b+'反超比分。',
    #             highest_score_player + '得到'+team_b+'最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time, time2=b_lead_time)
    score_difference_a,score_difference_b=get_score_difference(score_event,time1=a_lead_time,time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=a_lead_time)
    if a_lead<=5 :
        start_msg1=team_a+'稍微占据主动,领先'+team_b+str(a_lead)+'分左右。'
        start_msg2 = team_a + '比' + team_b + '状态略好一些,以小比分领先。'
        start_msg3 = team_a + '先声夺人,以小比分领先'+team_b+'。'
        start_msg4 = team_a + '稍占优势,'+lead_player_a+'的进球帮助'+team_a+'领先了'+str(a_lead)+'分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead<=5:
            start='双方你来我往，非常焦灼'
            mid_msg1='随后'+team_b+'发起了反扑,反超了'+team_a+str(b_lead)+'分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,' +lead_player_b + lead_event_b + '帮助球队反超了'+str(b_lead)+'分。'
            mid_msg3 = '随后' + team_b + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 ='随后' + team_b+'迅速觉醒,打了一波'+str(score_difference_b)+'-'+str(score_difference_a)+'的反击一举反超了比分。'
            mid_msg5 = '随后' + team_b+'打出了一波'+str(score_difference_b)+'-'+str(score_difference_a)+'的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_b+'抓住机会,打出'+str(score_difference_b)+'-'+str(score_difference_a)+'的小高潮,反超了比分。'
        elif b_lead>5 and b_lead<=10:
            start = ''
            mid_msg1 = '随后' + team_b + '找回了状态,发起了猛烈的攻势,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,'+team_b+'净胜了'+str(b_lead+a_lead)+'分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的'+team_a+'措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,' + team_b + '净胜了' + str(
                        b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            #分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif a_lead>5 and a_lead<=10:
        start_msg1 = team_a + '迅速进入状态,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分逐渐被拉开。'
        start_msg3 = team_a + '反客为主,领先' + team_b+'近10分。'
        start_msg4 = team_a + '优势明显,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下'+str(d1[0][1])+'分,帮助'+team_a+'领先了'+str(a_lead)+'分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '占据了主动。'
        start_msg7 = team_a + '最多领先'+team_b+str(a_lead)+'分,期间'+d1[0][0]+'表现抢眼,砍下'+str(d1[0][1])+'分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻小高潮,领先了比分。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead<=5:
            start = ''
            mid_msg1='随后'+team_b+'发起了反扑,分差被逐渐扳平,最后反超了'+team_a+str(b_lead)+'分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,比分发生了逆转，' +lead_player_b + lead_event_b + '帮助球队反超了'+str(b_lead)+'分。'
            mid_msg3 = '随后' + team_b + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了'+str(d3[0][1])+'分,不仅抹平了分差，还反超了'+str(b_lead)+'分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，'+d3[0][0]+'砍下'+str(d3[0][1])+'分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead>5 and b_lead<=10:
            start = ''
            mid_msg1 = '随后' + team_b + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,'+team_b+'净胜了'+str(b_lead+a_lead)+'分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的'+team_a+'搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把'+team_a+'打蒙了,'+'反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,' + team_b + '净胜了' + (
                        b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_b +'和'+team_a+ '优势互换'+ d3[0][0]+'砍下'+str(d3[0][1])+'分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
    else:
        start_msg1 = team_a + '状态火爆,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分已经完全被拉开。'
        start_msg3 = team_a + '反客为主,没有给主队丝毫情面，领先' + team_b + str(a_lead)+'分。'
        start_msg4 = team_a + '占据绝对优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'


        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
        start_msg7 = team_a + '最多领先' + team_b +'高达'+ str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(d1[0][1]) + '分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻狂潮,领先分数上双。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead<=5:
            start = ''
            mid_msg1='随后,风云突变,'+team_b+'绝境逆转,分差被逐渐扳平,最后反超了'+team_a+str(b_lead)+'分。'
            mid_msg2 = '随后,风云突变,' + team_b + '发起了绝地反扑,比分发生了逆转，' +lead_player_b + lead_event_b + '帮助球队反超了'+str(b_lead)+'分。'
            mid_msg3 = '随后,风云突变,' + team_b + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead>5 and b_lead<=10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,'+team_b+'净胜了'+str(b_lead+a_lead)+'分。'
            mid_msg3 = '随后,风云突变,' + team_b + '一波反攻,打的'+team_a+'搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            #判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把'+team_a+'打蒙了,'+'反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分,' + team_b + '净胜了' + str(
                        b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'


            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
    start_msg=[]
    mid_msg=[]
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)]!= '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    #这个在外面加
    end_msg='节末'+team_a+'还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    #整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a,score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b,score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1=''
    s_msg2=''
    if len(continue_score_player_a)>0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0])-int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[1])>0:
            s_msg1=continue_score_player_sorted_a[0][0]+'一人连续得到'+str(continue_score_player_sorted_a[0][1][0])+'分,帮助'+team_a+'取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0])-int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[1])<0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b)>0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0])-int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[1])>0:
            s_msg2=continue_score_player_sorted_b[0][0]+'一人连续得到'+str(continue_score_player_sorted_b[0][1][0])+'分,帮助'+team_b+'取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0])-int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[1])<0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为'+continue_score_player_sorted_b[0][1][-1][-1]+'。'


    part1=random.choice(start_msg)
    part2=random.choice(mid_msg)
    if part1=='':
        part1=start_msg1
    if part2=='':
        part2=mid_msg1
    quarter_s.append(part1+part2)

def method37(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #一直落后
    d1, d2 = get_highest_score_player(score_event_a, time1=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time2=b_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=b_lead_time)
    if b_lead<5:
        start_msg1='带着'+str(b_start)+'的落后分数,'+team_a+'始终紧咬着比分,分差始终在'+str(b_lead)+'内,没有被拉开。'
        start_msg2 = team_a+ '始终落后于' + team_b+ ',但是比分并没有被拉开,一直保持在'+str(b_lead)+'以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'
    elif b_lead>=5 and b_lead<10:
        if b_lead-b_start<=5:
            start_msg1 = '带着' + str(b_start) + '的落后分数,' + team_a + '始终紧咬着比分,但是分差并没有拉近,'+lead_player_b+lead_event_b+'后,'+team_b+'最多领先' + str(b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
            start_msg3 = team_b + '虽然一直保持领先,' + '但是最高领先只有' + str(b_lead) + '分。'
        else:
            start_msg1 = '带着' + str(
                b_start) + '的落后分数,' + team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
            start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

            start_msg4 = '带着' + str(
                b_start) + '的领先分数,' + team_b + '趁热打铁,打了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = '带着' + str(
                b_start) + '的领先分数,' + team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(score_difference_a1) + ',分差被进一步拉开。'
    else:
        if b_lead-b_start<=5:
            start_msg1 = '带着' + str(b_start) + '的落后分数,' + team_a + '没能进一步拉近比分,'+lead_player_b+lead_event_b+'后,'+team_b+'最多领先' + str(b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',比分逐渐被拉开,最后达到了' + str(b_lead) + '分。'
            start_msg3 = team_b + '一直保持领先,' + '最高领先达到了' + str(b_lead) + '分。'
        else:
            start_msg1 = '带着' + str(
                b_start) + '的落后分数,' + team_a + '还在被迅速拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',并且比分一度被拉开到' + str(b_lead) + '分。'
            start_msg3 = team_b + '一直保持领先,' + '最大分差也被拉大到了' + str(b_lead) + '分。'

            start_msg4 = team_b + '再次发力,打了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(score_difference_a1) + ',分差被进一步拉开。'

            start_msg6 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg7 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '建立了较大的优势。。'
            start_msg8 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d3[0][0] + '状态爆发,砍下' + str(
                d3[0][1]) + '分。'

    if b_lead-b_end<8:
        mid_msg1 = '节末'+team_a+'稍微拉近了比分。'
        mid_msg2 = team_a+'没有让比分进一步扩大,最后时刻搬回了一些比分。'
    else:
        mid_msg1 = '随后' + team_a + '状态回暖,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的反击成功拉近比分。'
        mid_msg2 = '随后' + team_a + '打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的小高潮,拉近比分。'
        mid_msg3 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的小高潮,缩小了分差。'

        mid_msg4 = '随后' + d1[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d1[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d1[0][0] + '开始爆发,他一人砍下了' + str(d1[0][1]) + '分,缩小了分差。'



    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b,score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1])>process_time(continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1=continue_score_player_sorted_a[0][0]+'一人连续得到'+str(continue_score_player_sorted_a[0][1][0])+'分,帮助'+team_a+'拉近比分。'
            m_msg1='但是'+continue_score_player_sorted_b[0][0]+'不甘示弱,连续得到'+str(continue_score_player_sorted_b[0][1][0])+'分,'+team_b+'始终领先'+team_a+'。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '紧咬比分。'
    elif continue_score_player_sorted_a is not None :
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
        m_msg1 = '但是' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    else:
        s_msg1=''
        m_msg1=''

    start_msg=[]
    mid_msg=[]
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    quarter_s.append(random.choice(start_msg)+random.choice(mid_msg))


def method33(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #一直领先
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=a_lead_time)

    if a_lead < 5:
        start_msg1 = '带着' + str(a_start) + '的落后分数,' + team_b + '始终紧咬着比分,分差始终在' + str(a_lead) + '内,没有被拉开。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'

        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'
        start_msg4 = '带着' + str(a_start) + '的分数领先,' + team_a + '始终压制着'+team_b+',领先分数保持' + str(a_lead) + '内,没有拉开。'

    elif a_lead >= 5 and a_lead < 10:
        if a_lead - a_start <= 5:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '始终紧咬着比分,但是分差并没有拉近,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先,' + '但是最高领先只有' + str(a_lead) + '分。'


        else:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

            start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + ',分差被进一步拉开。'


    else:
        if a_lead - a_start <= 5:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '没能进一步拉近比分,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',比分逐渐被拉开,最后达到了' + str(a_lead) + '分。'
            start_msg3 = team_a + '虽然一直保持领先，' + '最高领先达到了' + str(a_lead) + '分。'
        else:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

            start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + ',分差被进一步拉开。'

            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
            start_msg7 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
            start_msg8 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

    if a_lead-a_end<8:
        mid_msg1 = '节末'+team_b+'稍微拉近了比分。'
    else:
        mid_msg1 = '随后' + team_b + '状态回暖,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的反击成功拉近比分。'
        mid_msg2 = '随后' + team_b + '打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,拉近比分。'
        mid_msg3 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,缩小了分差。'

        mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,缩小了分差。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and  continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '紧咬比分。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '始终领先' + team_b + '。'
    elif  continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif  continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
        m_msg1 = '但是' + team_a + '整体发挥出色,' + team_a + '始终领先' + team_b + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))

def method6(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #先落后再领先
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_b, time2=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_a, time1=b_lead_time, time2=a_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=b_lead_time, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=b_lead_time)

    if b_lead <= 5:
        start_msg1 = team_b + '稍微占据主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = team_b + '比' + team_a + '状态略好一些,以小比分领先。'
        start_msg3 = team_b + '先声夺人,以小比分领先' + team_a + '。'
        start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_a + '发起了反扑,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'


            mid_msg4 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'

        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '找回了状态,发起了猛烈的攻势,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif b_lead > 5 and b_lead <= 10:
        start_msg1 = team_b + '迅速进入状态,领先了' + team_a + str(b_lead) + '分左右。'
        start_msg2 = team_b + '比' + team_a + '状态更好,比分逐渐被拉开。'
        start_msg3 = team_b + '反客为主,领先' + team_a + '近10分。'
        start_msg4 = team_b + '优势明显,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '占据了主动。'
        start_msg7 = team_b + '最多领先' + team_a + str(b_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

        start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻小高潮,领先了比分。'
        start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_a + '发起了反扑,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_a + '和' + team_b + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
    else:
        start_msg1 = team_b + '状态火爆,领先了' + team_a + str(b_lead) + '分左右。'
        start_msg2 = team_b + '比' + team_a + '状态更好,比分已经完全被拉开。'
        start_msg3 = team_b + '反客为主,没有给主队丝毫情面，领先' + team_a + str(b_lead) + '分。'
        start_msg4 = team_b + '占据绝对优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
        start_msg7 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
            d1[0][1]) + '分。'

        start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻狂潮,领先分数上双。'
        start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '绝境逆转,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '发起了绝地反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '节末' + team_b + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_a + '优势在渐渐缩小,比分在拉近。'


    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)  #+ end_msg1)

def method14(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 平 一直落后
    # b_end=int(score_event[-1][-2].split('-')[1])-int(score_event[-1][-2].split('-')[0])
    d1, d2 = get_highest_score_player(score_event_a, time1=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time2=b_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=b_lead_time)
    if b_lead < 5:
        start_msg1 = team_a + '始终紧咬着比分,分差始终在' + str(b_lead) + '内,没有被拉开。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'
    elif b_lead >= 5 and b_lead < 10:

        start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

        start_msg4 = team_b + '趁热打铁,打了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + ',分差被进一步拉开。'
    else:
        start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

        start_msg4 = team_b + '迅速发力,打了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + ',分差被进一步拉开。'

        start_msg6 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
        start_msg7 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
        start_msg8 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d3[0][0] + '状态爆发,砍下' + str(
            d3[0][1]) + '分。'

    if b_lead - b_end < 8:
        mid_msg1 = '节末' + team_a + '稍微拉近了比分。'
    else:
        mid_msg1 = '随后' + team_a + '状态回暖,打了一波' + str(score_difference_a2) + '-' + str(
            score_difference_b2) + '的反击成功拉近比分。'
        mid_msg2 = '随后' + team_a + '打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的小高潮,拉近比分。'
        mid_msg3 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的小高潮,缩小了分差。'

        mid_msg4 = '随后' + d1[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d1[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d1[0][0] + '开始爆发,他一人砍下了' + str(d1[0][1]) + '分,缩小了分差。'
        mid_msg6= '随后' + d1[0][0] + '和' + d1[1][0] + '的' + str(d1[0][1] + d1[1][1]) + '分,帮助' + team_a + '缩小了分差。'
        mid_msg7= '随后' + d1[0][0] + '和' + d1[1][0] + '带领'+team_a+'反攻,他们分别得到' + str(d1[0][1]) + '分和' + str(
            d1[1][1]) + '分,帮助' + team_a + '缩小了分差。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '始终领先' + team_a + '。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '紧咬比分。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
        m_msg1 = '但是' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))


def method18(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #领先 先领先后落后

    # base_start = [lead_player_a + lead_event_a + '后，' + team_a + '最大领先了' + str(
    #     a_lead) + '分。' + '随后' + team_b + '打出一波反攻，' + lead_player_b + lead_event_b + '反超比分。',
    #               highest_score_player + '得到' + team_b + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time, time2=b_lead_time)
    score_difference_a, score_difference_b = get_score_difference(score_event, time1=a_lead_time, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=a_lead_time)
    if a_lead <= 5:
        start_msg1 = team_a + '领先' + team_b + str(a_lead) + '分左右。'
        start_msg2 = '带着' + str(a_start) + '分的领先优势,' + team_a + '比' + team_b + '状态略好一些,以小比分领先。'
        start_msg3 = '带着' + str(a_start) + '分的领先优势,' + team_a + '先声夺人,顶住了压力,以小比分领先' + team_b + '。'
        start_msg4 = '带着' + str(a_start) + '分的领先优势,' + team_a + '稍占优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_b + '发起了反扑,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '找回了状态,发起了猛烈的攻势,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif a_lead > 5 and a_lead <= 10:
        start_msg1 = team_a + '迅速进入状态,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分逐渐被拉开。'
        start_msg3 = team_a + '反客为主,领先' + team_b + '近10分。'
        start_msg4 = team_a + '优势明显,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '占据了主动。'
        start_msg7 = team_a + '最多领先' + team_b + str(a_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻小高潮,领先了比分。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_b + '发起了反扑,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_b + '和' + team_a + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
    else:
        start_msg1 = team_a + '状态火爆,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分已经完全被拉开。'
        start_msg3 = team_a + '反客为主,没有给主队丝毫情面，领先' + team_b + str(a_lead) + '分。'
        start_msg4 = team_a + '占据绝对优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
        start_msg7 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
            d1[0][1]) + '分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻狂潮,领先分数上双。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '绝境逆转,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '发起了绝地反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    # 这个在外面加
    end_msg = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2 )#+ end_msg)

def method11(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 平 一直领先

    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=a_lead_time)

    if a_lead < 5:
        start_msg1 = team_b + '始终紧咬着比分,分差始终在' + str(a_lead) + '内,没有被拉开。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'

        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'
        start_msg4 = team_a + '始终压制着' + team_b + ',领先分数保持' + str(a_lead) + '内,没有拉开。'

    elif a_lead >= 5 and a_lead < 10:
        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

        start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + ',分差被进一步拉开。'


    else:

        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

        start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + ',分差被进一步拉开。'

        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg7 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
        start_msg8 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
            d1[0][1]) + '分。'

    if a_lead - a_end < 8:
        mid_msg1 = '节末' + team_b + '稍微拉近了比分。'
    else:
        mid_msg1 = '随后' + team_b + '状态回暖,打了一波' + str(score_difference_b2) + '-' + str(
            score_difference_a2) + '的反击成功拉近比分。'
        mid_msg2 = '随后' + team_b + '打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,拉近比分。'
        mid_msg3 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,缩小了分差。'

        mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,缩小了分差。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None :
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '紧咬比分。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '始终领先' + team_b + '。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
        m_msg1 = '但是' + team_a + '整体发挥出色,' + team_a + '始终领先' + team_b + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))

def method4(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #平 领先 最后落后最多
    # base_start = [lead_player_a + lead_event_a + '后，' + team_a + '最大领先了' + str(
    #     a_lead) + '分。' + '随后' + team_b + '打出一波反攻，' + lead_player_b + lead_event_b + '反超比分。',
    #               highest_score_player + '得到' + team_b + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time, time2=b_lead_time)
    score_difference_a, score_difference_b = get_score_difference(score_event, time1=a_lead_time, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=a_lead_time)
    if a_lead <= 5:
        start_msg1 = team_a + '稍微占据主动,领先' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态略好一些,以小比分领先。'
        start_msg3 = team_a + '先声夺人,以小比分领先' + team_b + '。'
        start_msg4 = team_a + '稍占优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_b + '发起了反扑,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
            mid_msg7 = '但是' + team_a + '并没有领先太久,'+team_b+'攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg8 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg9 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '找回了状态,发起了猛烈的攻势,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg8 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg9 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg8 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg9 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

    elif a_lead > 5 and a_lead <= 10:
        start_msg1 = team_a + '迅速进入状态,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分逐渐被拉开。'
        start_msg3 = team_a + '反客为主,领先' + team_b + '近10分。'
        start_msg4 = team_a + '优势明显,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '占据了主动。'
        start_msg7 = team_a + '最多领先' + team_b + str(a_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻小高潮,领先了比分。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_b + '发起了反扑,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_b + '和' + team_a + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

    else:
        start_msg1 = team_a + '状态火爆,领先了' + team_b + str(a_lead) + '分左右。'
        start_msg2 = team_a + '比' + team_b + '状态更好,比分已经完全被拉开。'
        start_msg3 = team_a + '反客为主,没有给主队丝毫情面，领先' + team_b + str(a_lead) + '分。'
        start_msg4 = team_a + '占据绝对优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

        # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
        start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
        start_msg7 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
            d1[0][1]) + '分。'

        start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '的进攻狂潮,领先分数上双。'
        start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '绝境逆转,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '发起了绝地反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'

            mid_msg10 = '但是' + team_a + '并没有领先太久,' + team_b + '攻势猛烈,不仅扳平了比分,还在节末达到了最大领先。'
            mid_msg11 = '但是' + team_a + '不久就失去了主动权,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'
            mid_msg12 = '但是' + team_a + '并没有继续扩大优势,' + team_b + '不仅扳平了比分,还不断扩大领先直到本节结束。'

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 13):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    # 这个在外面加
    # end_msg = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    # end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)

def method23(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #开始领先最大 后落后
    # base_start = [lead_player_a + lead_event_a + '后，' + team_a + '最大领先了' + str(
    #     a_lead) + '分。' + '随后' + team_b + '打出一波反攻，' + lead_player_b + lead_event_b + '反超比分。',
    #               highest_score_player + '得到' + team_b + '最高分' + str(highest_score) + '分帮助球队领先']
    # d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time, time2=b_lead_time)
    score_difference_a, score_difference_b = get_score_difference(score_event, time1=a_lead_time, time2=b_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=a_lead_time)
    if a_lead <= 5:
        start_msg1 =  team_a + '开始稍微占据主动,领先' + team_b + str(a_lead) + '分左右。'
        start_msg2 = '开始'+team_a+'优势最大。'
        start_msg3 = '由于上一节积攒的优势,'+team_a+'领先着比分。'
        start_msg4 = ''

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_b + '发起了反扑,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '找回了状态,发起了猛烈的攻势,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif a_lead > 5 and a_lead <= 10:
        start_msg1 = team_a + '开始稍微占据主动,领先' + team_b + str(a_lead) + '分左右。'
        start_msg2 = '开始' + team_a + '优势最大,似乎已经占据了主动权。'
        start_msg3 = '由于上一节积攒的优势,' + team_a + '领先着比分。'
        start_msg4 = '带着上一节'+str(a_lead)+'的领先分数,'+team_a+'看似已经占据了主动。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_b + '发起了反扑,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,比分发生了逆转，，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_b + '和' + team_a + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
    else:
        start_msg1 = team_a + '开始完全占据了主动,领先' + team_b + str(a_lead) + '分左右。'
        start_msg2 = '开始' + team_a + '优势最大,似乎已经占据了主动权。'
        start_msg3 = '由于上一节积攒的巨大优势,' + team_a + '领先着比分。。'
        start_msg4 = '带着上一节'+str(a_lead)+'的领先分数,'+team_a+'看似已经占据了主动。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '绝境逆转,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '发起了绝地反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    # 这个在外面加
    end_msg = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    quarter_s.append(part1 + part2 )#+ end_msg)

def method40(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 先落后再领先
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_b, time2=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_a, time1=b_lead_time, time2=a_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=b_lead_time, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=b_lead_time)

    if b_lead <= 5:
        start_msg1 = '带着上节的优势'+team_b + '稍微占据主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = '延续了上节的状态,'+team_b + '比' + team_a + '状态略好一些,以小比分领先。'
        start_msg3 = '比分上的优势帮助'+team_b + '顶住了主场压力,稍微扩大了对' + team_a + '的领先。'
        start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_a + '发起了反扑,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'

        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '找回了状态,发起了猛烈的攻势,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif b_lead > 5 and b_lead <= 10:
        if b_lead-b_start<5:
            start_msg1 = '带着上节的优势' + team_b + '占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '延续了上节的状态,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '比分上的优势帮助' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '迅速进入状态,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分逐渐被拉开。'
            start_msg3 = team_b + '反客为主,领先' + team_a + '近10分。'
            start_msg4 = team_b + '优势明显,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '占据了主动。'
            start_msg7 = team_b + '最多领先' + team_a + str(b_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_a + '发起了反扑,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_a + '和' + team_b + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
    else:
        if b_lead-b_start<5:
            start_msg1 = '带着上节的优势' + team_b + '继续占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '延续了上节的状态,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '比分上的优势帮助' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '状态火爆,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分已经完全被拉开。'
            start_msg3 = team_b + '反客为主,没有给主队丝毫情面，领先' + team_a + str(b_lead) + '分。'
            start_msg4 = team_b + '占据绝对优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
            start_msg7 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻狂潮,领先分数上双。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '绝境逆转,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '发起了绝地反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '节末' + team_b + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_a + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2 )#+ end_msg1)

def method36(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #开始落后 一直落后
    d1, d2 = get_highest_score_player(score_event_a, time1=b_lead_time)
    # d3, d4 = get_highest_score_player(score_event_b, time2=b_lead_time)
    # score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=b_lead_time)
    if b_lead < 5:
        start_msg1 ='带着' + str(b_start) +'的落后分数,'+ team_a + '始终紧咬着比分,分差始终在' + str(b_lead) + '内,没有被拉开。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'
    elif b_lead >= 5 and b_lead < 10:

        start_msg1 = '带着' + str(
            b_start) + '的落后分数,' + team_a + '始终紧咬着比分,但是分差并没有拉近,'  + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先,' + '但是最高领先只有' + str(b_lead) + '分。'



    else:

        start_msg1 = '带着' + str(
            b_start) + '的落后分数,' + team_a + '一直努力在拉近比分,'  + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '落后' + team_b + str(b_lead)+'分,'+team_b+'握有巨大的优势。'
        start_msg3 = team_b + '带着上一节的优势' + '最高领先达到了' + str(b_lead) + '分。'


    if b_lead - b_end < 8:
        mid_msg1 = '随后的比赛中' + team_a + '一直在尝试缩小比分差距,在节末稍微拉近了比分。'
    else:
        mid_msg1 = '随后' + d1[0][0]+'和'+d1[1][0]+ '的' + str(d1[0][1]+d1[1][1]) + '分,帮助'+team_a+'缩小了分差。'
        mid_msg2 = '随后' + d1[0][0]+'和'+d1[1][0]+ '带领'+team_a+'反攻,他们分别得到' + str(d1[0][1])+'分和'+str(d1[1][1]) + '分,帮助'+team_a+'缩小了分差。'
        mid_msg3 = ''

        mid_msg4 = '随后' + d1[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d1[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d1[0][0] + '开始爆发,他一人砍下了' + str(d1[0][1]) + '分,缩小了分差。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None > 0 and continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '始终领先' + team_a + '。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '紧咬比分。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
        m_msg1 = '但是' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 13):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    # 这个在外面加
    # end_msg = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    # end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)

def method43(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 先落后再领先 在落后
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_b, time2=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_a, time1=b_lead_time, time2=a_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=b_lead_time, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=b_lead_time)

    if b_lead <= 5:
        start_msg1 = '带着上节的优势'+team_b + '稍微占据主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = '延续了上节的状态,'+team_b + '比' + team_a + '状态略好一些,以小比分领先。'
        start_msg3 = '比分上的优势帮助'+team_b + '顶住了主场压力,稍微扩大了对' + team_a + '的领先。'
        start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_a + '发起了反扑,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'

        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '找回了状态,发起了猛烈的攻势,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif b_lead > 5 and b_lead <= 10:
        if b_lead-b_start<5:
            start_msg1 = '带着上节的优势' + team_b + '占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '延续了上节的状态,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '比分上的优势帮助' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '迅速进入状态,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分逐渐被拉开。'
            start_msg3 = team_b + '反客为主,领先' + team_a + '近10分。'
            start_msg4 = team_b + '优势明显,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '占据了主动。'
            start_msg7 = team_b + '最多领先' + team_a + str(b_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_a + '发起了反扑,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_a + '和' + team_b + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
    else:
        if b_lead-b_start < 5:
            start_msg1 = '带着上节的优势' + team_b + '继续占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '延续了上节的状态,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '比分上的优势帮助' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '状态火爆,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分已经完全被拉开。'
            start_msg3 = team_b + '反客为主,没有给主队丝毫情面，领先' + team_a + str(b_lead) + '分。'
            start_msg4 = team_b + '占据绝对优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
            start_msg7 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的进攻狂潮,领先分数上双。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '绝境逆转,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '发起了绝地反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '本节真是一波三折,' + team_b + '在最后时刻又反超了比分'
    end_msg2 = '经历了落后到领先,' + team_a + '最后又被'+team_b+'反超比分。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2 )#+ end_msg1)

def method27(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #开始领先 先落后再领先
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_b, time2=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_a, time1=b_lead_time, time2=a_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=b_lead_time, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=b_lead_time)

    if b_lead <= 5:
        if b_lead+a_start<8:
            start_msg1 = '比分落后的' + team_b + '一上来便占据主动,逆转并领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_b + '比' + team_a + '状态略好一些,逆转了之前的劣势,并以小比分领先。'
            start_msg3 = '处于劣势的' + team_b + '顶住了压力,逆转了' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 ='比分落后的' + team_b + '迅速进入状态,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_b + team_b + '比' + team_a + '状态更好,比分逐渐被拉开。'
            start_msg3 ='暂时落后的' + team_b + '充分利用了主场优势,反超并领先' + team_a + '近10分。'
            start_msg4 = team_b + '优势明显,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '重新占据了主动。'
            start_msg7 = team_b + '最多领先' + team_a + str(b_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(
                score_difference_a2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'
        if a_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_a + '发起了反扑,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'

        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '找回了状态,发起了猛烈的攻势,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif b_lead > 5 and b_lead <= 10:
        if b_lead + a_start < 5:
            start_msg1 = '比分落后的' + team_b + '占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '处于被动的' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '迅速进入状态,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分逐渐被拉开。'
            start_msg3 = team_b + '反客为主,领先' + team_a + '近10分。'
            start_msg4 = team_b + '优势明显,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '占据了主动。'
            start_msg7 = team_b + '最多领先' + team_a + str(b_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(
                score_difference_a2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_a + '发起了反扑,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_a + '和' + team_b + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
    else:
        if b_lead - b_start < 5:
            start_msg1 = '带着上节的优势' + team_b + '继续占据主动,领先' + team_a + str(b_lead) + '分左右。'
            start_msg2 = '延续了上节的状态,' + team_b + '比' + team_a + '状态略好一些,以小比分领先。'
            start_msg3 = '比分上的优势帮助' + team_b + '顶住了主场压力,扩大了对' + team_a + '的领先。'
            start_msg4 = team_b + '稍占优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_b + '状态火爆,领先了' + team_a + str(b_lead) + '分左右。'
            start_msg2 = team_b + '比' + team_a + '状态更好,比分已经完全被拉开。'
            start_msg3 = team_b + '反客为主,没有给主队丝毫情面，领先' + team_a + str(b_lead) + '分。'
            start_msg4 = team_b + '占据绝对优势,' + lead_player_b + '的进球帮助' + team_b + '领先了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
            start_msg7 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

            start_msg8 = team_b + '状态火热,打了一波' + str(score_difference_b2) + '-' + str(
                score_difference_a2) + '的进攻狂潮,领先分数上双。'
            start_msg9 = team_b + '快速进入状态,打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '占据了主动。'

        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '绝境逆转,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '发起了绝地反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '节末' + team_b + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_a + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)# + end_msg1)

def method51(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 开始落后 先领先再落后
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time, time2=b_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=a_lead_time, time2=b_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=a_lead_time)

    if a_lead <= 5:
        if a_lead + b_start < 8:
            start_msg1 = '比分落后的' + team_a + '一上来便占据主动,逆转并领先' + team_b + str(a_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_a + '比' + team_b + '状态略好一些,逆转了之前的劣势,并以小比分领先。'
            start_msg3 = '处于被动的,' + team_a + '顶住了压力,逆转了' + team_b + '的领先。'
            start_msg4 = team_a + '稍占优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = '比分落后的' + team_a + '迅速进入状态,领先了' + team_b + str(a_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_a + team_a + '比' + team_b + '状态更好,比分逐渐被拉开。'
            start_msg3 = '暂时落后的' + team_a + '充分利用了主场优势,反超并领先' + team_b + '近10分。'
            start_msg4 = team_a + '优势明显,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '重新占据了主动。'
            start_msg7 = team_a + '最多领先' + team_b + str(a_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(
                score_difference_b2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'
        if b_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_b + '发起了反扑,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'

        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '找回了状态,发起了猛烈的攻势,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif a_lead > 5 and a_lead <= 10:
        if a_lead + b_start < 5:
            start_msg1 = '比分落后的' + team_a + '占据主动,领先' + team_b + str(a_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_a + '比' + team_b + '状态略好一些,以小比分领先。'
            start_msg3 = '处于被动的' + team_a + '顶住了主场压力,扩大了对' + team_b + '的领先。'
            start_msg4 = team_a + '稍占优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_a + '迅速进入状态,领先了' + team_b + str(a_lead) + '分左右。'
            start_msg2 = team_a + '比' + team_b + '状态更好,比分逐渐被拉开。'
            start_msg3 = team_a + '反客为主,领先' + team_b + '近10分。'
            start_msg4 = team_a + '优势明显,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '占据了主动。'
            start_msg7 = team_a + '最多领先' + team_b + str(a_lead) + '分,期间' + d1[0][0] + '表现抢眼,砍下' + str(d1[0][1]) + '分。'

            start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(
                score_difference_b2) + '的进攻小高潮,领先了比分。'
            start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'

        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_b + '发起了反扑,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '发起了反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(b_lead) + '分。'
            mid_msg3 = '随后' + team_b + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_b + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_b + '和' + team_a + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
    else:
        if a_lead + b_start < 5:
            start_msg1 = '比分落后的' + team_a + '继续占据主动,领先' + team_b + str(a_lead) + '分左右。'
            start_msg2 = '经过休息期间的调整,' + team_a + '比' + team_b + '状态略好一些,以小比分领先。'
            start_msg3 = '处于被动的' + team_a + '顶住了主场压力,扩大了对' + team_b + '的领先。'
            start_msg4 = team_a + '稍占优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            start_msg5 = ''
            start_msg6 = ''
            start_msg7 = ''
        else:
            start_msg1 = team_a + '状态火爆,领先了' + team_b + str(a_lead) + '分左右。'
            start_msg2 = team_a + '比' + team_b + '状态更好,比分已经完全被拉开。'
            start_msg3 = team_a + '反客为主,没有给主队丝毫情面，领先' + team_b + str(a_lead) + '分。'
            start_msg4 = team_a + '占据优势,' + lead_player_a + '的进球帮助' + team_a + '领先了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            start_msg5 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
            start_msg7 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

            start_msg8 = team_a + '状态火热,打了一波' + str(score_difference_a2) + '-' + str(
                score_difference_b2) + '的进攻狂潮,领先分数上双。'
            start_msg9 = team_a + '快速进入状态,打出了一波' + str(score_difference_a2) + '-' + str(score_difference_b2) + '占据了主动。'

        if b_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '绝境逆转,分差被逐渐扳平,最后反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '发起了绝地反扑,比分发生了逆转，' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(score_difference_a) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的小高潮,反超了比分。'
        elif b_lead > 5 and b_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_b + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_b + '没有被打垮，剧烈反扑,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_b + '一波反攻,打的' + team_a + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_b + '打出一波高潮,把' + team_a + '打蒙了,' + '反超了' + team_a + str(b_lead) + '分。'
            mid_msg2 = '随后' + team_b + '绝地求生,' + lead_player_b + lead_event_b + '帮助球队反超了' + str(
                b_lead) + '分,' + team_b + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_b + '一波反攻,打的' + team_a + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(b_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_b + '不仅扳平了比分，还取得领先，领先' + str(b_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_b + '迅速觉醒,打了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_b + '打出了一波' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b) + '-' + str(
                score_difference_a) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)# + end_msg1)

def method45(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # base_start = [lead_player_b + lead_event_b + '后，' + team_b + '最大领先了' + str(
    #     b_lead) + '分。' + '随后' + team_a + '打出一波反攻，' + lead_player_a + lead_event_a + '反超比分。',
    #               highest_score_player + '得到' + team_a + '最高分' + str(highest_score) + '分帮助球队领先']
    # d1, d2 = get_highest_score_player(score_event_b, time2=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_a, time1=b_lead_time, time2=a_lead_time)

    score_difference_a, score_difference_b = get_score_difference(score_event, time1=b_lead_time, time2=a_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time2=b_lead_time)

    if b_lead <= 5:
        start_msg1 = '带着上节的优势' + team_b + '稍微占据主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = '开始' + team_b + '优势最大。'
        start_msg3 = '由于上一节积攒的优势,' + team_b + '领先着比分。'
        start_msg4 = ''

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = '双方你来我往，非常焦灼'
            mid_msg1 = '随后' + team_a + '发起了反扑,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg5 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg6 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'

        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '找回了状态,发起了猛烈的攻势,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(b_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(b_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(b_lead) + '分,' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '措手不及,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 分差太小，考虑是否提球员表现
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
    elif b_lead > 5 and b_lead <= 10:
        start_msg1 = team_b + '开始稍微占据主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = '开始' + team_b + '优势最大,似乎已经占据了主动权。'
        start_msg3 = '由于上一节积攒的优势,' + team_b + '领先着比分。'
        start_msg4 = '带着上一节' + str(b_lead) + '的领先分数,' + team_b + '看似已经占据了主动。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后' + team_a + '发起了反扑,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '发起了反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '在主场球迷的鼓舞下,一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后' + team_a + '终于醒了,发起了猛烈的攻势,从落后将近10分变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '把球队扛在了肩上,他表现出色,一人砍下了' + str(d3[0][1]) + '分,不仅抹平了分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得不错的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead+a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + team_a + '和' + team_b + '优势互换' + d3[0][0] + '砍下' + str(d3[0][1]) + '分,逆转了战局。'
            mid_msg5 = '随后' + d3[0][0] + '无人能挡,他一人狂砍下' + str(d3[0][1]) + '分,带领球队净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得巨大的优势，领先最多达' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
    else:
        start_msg1 = team_b + '开始完全占据了主动,领先' + team_a + str(b_lead) + '分左右。'
        start_msg2 = '开始' + team_b + '优势最大,似乎已经占据了主动权。'
        start_msg3 = '由于上一节积攒的巨大优势,' + team_b + '领先着比分。。'
        start_msg4 = '带着上一节' + str(b_lead) + '的领先分数,' + team_b + '看似已经占据了主动。'

        # 分差太小，考虑是否提球员表现
        start_msg5 = ''
        start_msg6 = ''
        start_msg7 = ''
        if a_lead <= 5:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '绝境逆转,分差被逐渐扳平,最后反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '发起了绝地反扑,比分发生了逆转，' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '在主场球迷的鼓舞下,一波接着一波反攻,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '带领'+team_a+'反攻,他一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的反击一举反超了比分。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(score_difference_b) + '的小高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的小高潮,反超了比分。'
        elif a_lead > 5 and a_lead <= 10:
            start = ''
            mid_msg1 = '随后,风云突变,' + team_a + '终于野兽苏醒,发起了猛烈的攻势,从落后两位数变成了反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后,风云突变,' + team_a + '没有被打垮，剧烈反扑,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(b_lead + a_lead) + '分。'
            mid_msg3 = '随后,风云突变,' + team_a + '一波反攻,打的' + team_b + '搓手不急,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            # 判断得分最多的和第二多的差距，差比较大就只写一个人，小就两个人
            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
        else:
            start = ''
            mid_msg1 = '随后' + team_a + '打出一波高潮,把' + team_b + '打蒙了,' + '反超了' + team_b + str(a_lead) + '分。'
            mid_msg2 = '随后' + team_a + '绝地求生,' + lead_player_a + lead_event_a + '帮助球队反超了' + str(
                a_lead) + '分,' + team_a + '净胜了' + str(
                b_lead + a_lead) + '分。'
            mid_msg3 = '随后' + team_a + '一波反攻,打的' + team_b + '无法还击,' + '不仅抹平了分差,还帮助球队反超了' + str(a_lead) + '分。'

            mid_msg4 = '随后' + d3[0][0] + '一人砍下了' + str(d3[0][1]) + '分,不仅抹平了巨大的分差，还反超了' + str(a_lead) + '分。'
            mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,带领球队反超了' + str(a_lead) + '分。'
            mid_msg6 = '然而之后' + team_a + '不仅扳平了比分，还取得领先，领先' + str(a_lead) + '分，' + d3[0][0] + '砍下' + str(
                d3[0][1]) + '分,是首要功臣。'

            mid_msg7 = '随后' + team_a + '迅速觉醒,打了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的强势反击一举反超了比分,逐渐占据主动。'
            mid_msg8 = '随后' + team_a + '打出了一波' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的进攻高潮,反超了比分。'
            mid_msg9 = '随后' + team_a + '抓住机会,打出' + str(score_difference_a) + '-' + str(
                score_difference_b) + '的冲击波,反超了比分。'
    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    end_msg1 = '节末' + team_b + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_a + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)# + end_msg1)
def method39(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 开始落后 一直落后
    # d1, d2 = get_highest_score_player(score_event_a, time1=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time2=b_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=b_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=b_lead_time)
    if b_lead < 5:
        start_msg1 = '带着' + str(b_start) + '的落后分数,' + team_a + '始终紧咬着比分,分差始终在' + str(b_lead) + '内,没有被拉开。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'
    elif b_lead >= 5 and b_lead < 10:
        if b_lead - b_start <= 5:
            start_msg1 = '带着' + str(
                b_start) + '的落后分数,' + team_a + '始终紧咬着比分,但是分差并没有拉近,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
            start_msg3 = team_b + '虽然一直保持领先,' + '但是最高领先只有' + str(b_lead) + '分。'


        else:
            start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
            start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

            start_msg4 = team_b + '趁热打铁,打了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + ',分差被进一步拉开。'
    else:
        if b_lead - b_start <= 5:
            start_msg1 = '带着' + str(
                b_start) + '的落后分数,' + team_a + '没能进一步拉近比分,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',比分逐渐被拉开,最后达到了' + str(b_lead) + '分。'
            start_msg3 = team_b + '虽然一直保持领先，' + '最高领先达到了' + str(b_lead) + '分。'
        else:
            start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
                b_lead) + '分。'
            start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
            start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

            start_msg4 = team_b + '再次发力,打了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
                score_difference_a1) + ',分差被进一步拉开。'

            start_msg6 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
            start_msg7 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
            start_msg8 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d3[0][0] + '状态爆发,砍下' + str(
                d3[0][1]) + '分。'


    mid_msg1 =  '节末,'+team_b+'领先达到了最大。'


    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '始终领先' + team_a + '。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '紧咬比分。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
        m_msg1 = '但是' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 13):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    # 这个在外面加
    # end_msg = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    # end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'

    # 整节比赛中连续得分球员
    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    # process_time(continue_score_player_sorted_a[0][1][2][-1]) >= process_time(a_lead_time)
    s_msg1 = ''
    s_msg2 = ''
    if len(continue_score_player_a) > 0:
        if int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) > 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '取得优势'
        elif int(continue_score_player_sorted_a[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_a[0][1][-1][-1].split('-')[1]) < 0:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,但' + team_b + '依旧保持领先。'
        else:
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,双方打平'

    if len(continue_score_player_b) > 0:
        if int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) > 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '取得优势'
        elif int(continue_score_player_sorted_b[0][1][-1][-1].split('-')[0]) - int(
                continue_score_player_sorted_b[0][1][-1][-1].split('-')[1]) < 0:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,但' + team_a + '依旧保持领先。'
        else:
            s_msg2 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,双方比分为' + continue_score_player_sorted_b[0][1][-1][
                         -1] + '。'

    part1 = random.choice(start_msg)
    part2 = random.choice(mid_msg)
    if part1 == '':
        part1 = start_msg1
    if part2 == '':
        part2 = mid_msg1
    quarter_s.append(part1 + part2)

def method12(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 平 一直领先

    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    # d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=a_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=a_lead_time)

    if a_lead < 5:
        start_msg1 = team_b + '始终紧咬着比分,分差始终在' + str(a_lead) + '内,没有被拉开。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'

        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'
        start_msg4 = team_a + '始终压制着' + team_b + ',领先分数保持' + str(a_lead) + '内,没有拉开。'

    elif a_lead >= 5 and a_lead < 10:
        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

        start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + ',分差被进一步拉开。'


    else:

        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

        start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
            score_difference_b1) + ',分差被慢慢拉开。'

        start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
        start_msg7 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
        start_msg8 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
            d1[0][1]) + '分。'

    mid_msg1 = '节末,' + team_a + '领先达到了最大。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None :
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '紧咬比分。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '始终领先' + team_b + '。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
        m_msg1 = '但是' + team_a + '整体发挥出色,' + team_a + '始终领先' + team_b + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))



def method35(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #一直领先
    d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    # d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=a_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=a_lead_time)

    if a_lead < 5:
        start_msg1 = '带着' + str(a_start) + '的落后分数,' + team_b + '始终紧咬着比分,分差始终在' + str(a_lead) + '内,没有被拉开。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'

        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'
        start_msg4 = '带着' + str(a_start) + '的分数领先,' + team_a + '始终压制着'+team_b+',领先分数保持' + str(a_lead) + '内,没有拉开。'

    elif a_lead >= 5 and a_lead < 10:
        if a_lead - a_start <= 5:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '始终紧咬着比分,但是分差并没有拉近,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先,' + '但是最高领先只有' + str(a_lead) + '分。'


        else:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

            start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + ',分差被进一步拉开。'


    else:
        if a_lead - a_start <= 5:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '没能进一步拉近比分,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',比分逐渐被拉开,最后达到了' + str(a_lead) + '分。'
            start_msg3 = team_a + '虽然一直保持领先，' + '最高领先达到了' + str(a_lead) + '分。'
        else:
            start_msg1 = '带着' + str(
                a_start) + '的落后分数,' + team_b + '分差渐渐被拉开,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
                a_lead) + '分。'
            start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
            start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'

            start_msg4 = team_a + '趁热打铁,打了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + '的进攻小高潮,扩大了比分。'
            start_msg5 = team_a + '没有松懈,打出了一波' + str(score_difference_a1) + '-' + str(
                score_difference_b1) + ',分差被进一步拉开。'

            start_msg6 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '领先了' + str(a_lead) + '分。'
            start_msg7 = d1[0][0] + '砍下' + str(d1[0][1]) + '分,帮助' + team_a + '建立了较大的优势。'
            start_msg8 = team_a + '最多领先' + team_b + '高达' + str(a_lead) + '分,期间' + d1[0][0] + '状态爆发,砍下' + str(
                d1[0][1]) + '分。'

    mid_msg1 = '节末,' + team_a + '领先达到了最大。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and  continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '紧咬比分。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '始终领先' + team_b + '。'
    elif  continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif  continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
        m_msg1 = '但是' + team_a + '整体发挥出色,' + team_a + '始终领先' + team_b + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))



def method15(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    # 平 一直落后
    # b_end=int(score_event[-1][-2].split('-')[1])-int(score_event[-1][-2].split('-')[0])
    # d1, d2 = get_highest_score_player(score_event_a, time1=b_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time2=b_lead_time)
    score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=b_lead_time)
    # score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=b_lead_time)
    if b_lead < 5:
        start_msg1 = team_a + '始终紧咬着比分,分差始终在' + str(b_lead) + '内,没有被拉开。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'
    elif b_lead >= 5 and b_lead < 10:

        start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

        start_msg4 = team_b + '开始发力,打了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + ',分差被进一步拉开。'
    else:
        start_msg1 = team_a + '分差渐渐被拉开,' + lead_player_b + lead_event_b + '后,' + team_b + '最多领先' + str(
            b_lead) + '分。'
        start_msg2 = team_a + '始终落后于' + team_b + ',但是比分并没有被拉开,一直保持在' + str(b_lead) + '以内。'
        start_msg3 = team_b + '虽然一直保持领先，' + '但是最高领先只有' + str(b_lead) + '分。'

        start_msg4 = team_b + '开始发力,打了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + '的进攻小高潮,扩大了比分。'
        start_msg5 = team_b + '没有松懈,打出了一波' + str(score_difference_b1) + '-' + str(
            score_difference_a1) + ',分差被进一步拉开。'

        start_msg6 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '领先了' + str(b_lead) + '分。'
        start_msg7 = d3[0][0] + '砍下' + str(d3[0][1]) + '分,帮助' + team_b + '建立了较大的优势。'
        start_msg8 = team_b + '最多领先' + team_a + '高达' + str(b_lead) + '分,期间' + d3[0][0] + '状态爆发,砍下' + str(
            d3[0][1]) + '分。'


    mid_msg1 = '节末' + team_b + '领先达到最大。'


    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '始终领先' + team_a + '。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '紧咬比分。'
    elif continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉近比分。'
        m_msg1 = '但是' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])
    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))

def method32(quarter_s,team_a,a_start,a_lead,lead_player_a,lead_event_a,a_lead_time,team_b,b_start,b_lead,lead_player_b,lead_event_b,b_lead_time,score_event,score_event_a,score_event_b,a_end,b_end):
    #一直领先
    # d1, d2 = get_highest_score_player(score_event_a, time2=a_lead_time)
    d3, d4 = get_highest_score_player(score_event_b, time1=a_lead_time)
    # score_difference_a1, score_difference_b1 = get_score_difference(score_event, time2=a_lead_time)
    score_difference_a2, score_difference_b2 = get_score_difference(score_event, time1=a_lead_time)

    if a_lead < 5:
        start_msg1 = '带着' + str(a_start) + '的落后分数,' + team_b + '始终紧咬着比分,分差始终在' + str(a_lead) + '内,没有被拉开。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'

        start_msg3 = team_a + '虽然一直保持领先，' + '但是最高领先只有' + str(a_lead) + '分。'
        start_msg4 = '带着' + str(a_start) + '的分数领先,' + team_a + '始终压制着'+team_b+',领先分数保持' + str(a_lead) + '内,没有拉开。'

    elif a_lead >= 5 and a_lead < 10:
        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '始终紧咬着比分,但是分差并没有拉近,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',但是比分并没有被拉开,一直保持在' + str(a_lead) + '以内。'
        start_msg3 = team_a + '虽然一直保持领先,' + '但是最高领先只有' + str(a_lead) + '分。'




    else:
        start_msg1 = '带着' + str(
            a_start) + '的落后分数,' + team_b + '没能进一步拉近比分,' + lead_player_a + lead_event_a + '后,' + team_a + '最多领先' + str(
            a_lead) + '分。'
        start_msg2 = team_b + '始终落后于' + team_a + ',比分逐渐被拉开,最后达到了' + str(a_lead) + '分。'
        start_msg3 = team_a + '虽然一直保持领先，' + '最高领先达到了' + str(a_lead) + '分。'

    if a_lead-a_end<8:
        mid_msg1 = '节末'+team_b+'稍微拉近了比分。'
    else:
        mid_msg1 = '随后' + team_b + '状态回暖,打了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的反击成功拉近比分。'
        mid_msg2 = '随后' + team_b + '打出了一波' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,拉近比分。'
        mid_msg3 = '随后' + team_b + '抓住机会,打出' + str(score_difference_b2) + '-' + str(score_difference_a2) + '的小高潮,缩小了分差。'

        mid_msg4 = '随后' + d3[0][0] + '带领'+team_b+'反攻,他一人砍下了' + str(d3[0][1]) + '分,拉近了比分。'
        mid_msg5 = '随后' + d3[0][0] + '开始爆发,他一人砍下了' + str(d3[0][1]) + '分,缩小了分差。'

    continue_score_player_sorted_a, continue_score_player_a = get_continue_score_player(score_event_a, score_floor=6)
    continue_score_player_sorted_b, continue_score_player_b = get_continue_score_player(score_event_b, score_floor=6)
    if continue_score_player_sorted_a is not None and  continue_score_player_sorted_b is not None:
        if process_time(continue_score_player_sorted_a[0][1][2][-1]) > process_time(
                continue_score_player_sorted_b[0][1][2][-1]):
            s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '拉开比分。'
            m_msg1 = '但是' + continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,' + team_b + '紧咬比分。'
        else:
            s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
                continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
            m_msg1 = '但是' + continue_score_player_sorted_a[0][0] + '不甘示弱,连续得到' + str(
                continue_score_player_sorted_a[0][1][0]) + '分,' + team_a + '始终领先' + team_b + '。'
    elif  continue_score_player_sorted_a is not None:
        s_msg1 = continue_score_player_sorted_a[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_a[0][1][0]) + '分,帮助' + team_a + '保持领先优势。'
        m_msg1 = '本节比赛中,' + team_b + '整体发挥出色,' + team_b + '始终领先' + team_a + '。'
    elif  continue_score_player_sorted_b is not None:
        s_msg1 = continue_score_player_sorted_b[0][0] + '一人连续得到' + str(
            continue_score_player_sorted_b[0][1][0]) + '分,帮助' + team_b + '拉近比分。'
        m_msg1 = '但是' + team_a + '整体发挥出色,' + team_a + '始终领先' + team_b + '。'
    else:
        s_msg1 = ''
        m_msg1 = ''

    start_msg = []
    mid_msg = []
    local_variable = locals()
    for i in range(1, 10):
        if 'start_msg' + str(i) in local_variable and local_variable['start_msg' + str(i)] != '':
            start_msg.append(local_variable['start_msg' + str(i)])
        if 'mid_msg' + str(i) in local_variable and local_variable['mid_msg' + str(i)] != '':
            mid_msg.append(local_variable['mid_msg' + str(i)])

    quarter_s.append(random.choice(start_msg) + random.choice(mid_msg))


def get_end_msg1(team_a,team_b):
    #结束时落后（落后分数小于刚开始落后分数）
    end_msg1 = '节末' + team_a + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_b + '优势在渐渐缩小,比分在拉近。'
    return end_msg1,end_msg2


def get_end_msg2(team_a,team_b):
    #结束时领先（领先分数小于刚开始领先分数）
    end_msg1 = '节末' + team_b + '还在尝试迫近比分,比分在拉近。'
    end_msg2 = '节末' + team_a + '优势在渐渐缩小,比分在拉近。'
    return end_msg1, end_msg2

def get_end_msg3():
    return  None


func_dict = {
    1:method2,
    2: method2,
    3:method2,
    4:method4,
    5:method2,

    6:method6,
    7:method6,
    8:method6,
    9:method6,
    10:method6,

    11:method11,
    12:method12,
    13:method11,

    14:method14,
    15:method15,
    16:method14,

    17:method18,
    18:method18,
    19:method18,
    20:method18,
    21:method18,

    22:method23,
    23:method23,
    24:method23,
    25:method23,
    26:method23,

    27:method27,
    28:method27,
    29:method27,
    30:method27,
    31:method27,

    32:method32,
    33:method33,
    34:method33,
    35:method35,

    36:method36,
    37:method37,
    38:method36,
    39:method39,


    40:method40,
    41:method40,
    42:method40,
    43:method43,
    44:method40,

    45:method45,
    46:method45,
    47:method45,
    48:method45,
    49:method45,


    50:method51,
    51:method51,
    52:method51,
    53:method51,
    54:method51

}
